<template>
    <div>

        <el-form-item :label="item.label" prop="groupCode" >
            <!-- 下拉选择框 start  1 -->
            <el-select v-model="item.value" placeholder="请选择分组" v-if="item.col === 1">
                <el-option :label="item.value" :value="item.groupCode" v-for="(item, index) in groupList" :key="index"></el-option>
            </el-select>
            <!-- 下拉选择框 end -->

            <!-- 输入框 start  2 -->
            <el-input v-model="item.value" v-if="item.col === 2"></el-input>
            <!-- 输入框 end -->

            <!-- 上传图片 start 3 -->
            <el-upload
                v-if="item.col === 3"
                list-type="picture-card"
                class="upload-demo"
                :action="postFileUlr"
                :show-file-list="false"
                :on-success="uploadSuccess"
                multiple>
                <el-image v-if="item.value" class="swiper-ad" lazy fit="cover" :src="form.img"></el-image>
                <i class="el-icon-plus avatar-uploader-icon" v-else></i>
            </el-upload>
            <!-- 上传图片 start 3 -->

            <!-- 是否 start 4-->
            <el-select v-model="item.value" placeholder="请选择状态" v-if="item.col === 4">
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
            </el-select>
            <!-- 是否 start 4-->

            <!-- 状态 start  5 -->
            <el-select v-model="item.value" placeholder="请选择状态" v-if="item.col === 5">
                <el-option label="启用" :value="true"></el-option>
                <el-option label="禁用" :value="false"></el-option>
            </el-select>
            <!-- 状态 start  5 -->
        </el-form-item>

    </div>
</template>

<script>
    export default {
        props: ['item']
    }
</script>

<style lang="scss" scoped>

</style>